//
//  APIManager.h
//  ReactiveCocoaUserDemo
//
//  Created by zsp on 2017/3/14.
//  Copyright © 2017年 zsp. All rights reserved.
//

#import <Foundation/Foundation.h>

@class RACSignal;
@class XYUser;
@interface APIManager : NSObject

+(instancetype)sharedInstance;

//第三版：加入 AFNetworking-RACExtensions
- (RACSignal*)getUserByExtEmail:(NSString *)email;

//第二版：用 RACSignal 包起來
- (RACSignal*)getUserByEmail:(NSString *)email;

//第一版：單純使用 AFNetworking
- (NSURLSessionDataTask *)getUserByEmail:(NSString *)email success:(void (^)(XYUser *user))success failure:(void (^)(NSError *error))failure;
@end
